import {createRouter,createWebHistory} from 'vue-router'

const BpRecommend =()=> import('../views/recommend/BpRecommend')
const BpSquare =()=> import('../views/square/BpSquare')
const UserCenter =()=> import('../views/user/UserCenter')
const WatchTV =()=> import('../views/watchtv/WatchTV')
const Detail =()=> import('../views/detail/GoodsDetail')
const routes=[
    {
        path:'/',
        redirect:'/square'
    },
    {
        path:'/square',
        component:BpSquare
    },
    {
        path:'/recommend',
        component:BpRecommend
    },
    {
        path:'/user',
        component:UserCenter
    },
    {
        path:'/watchtv',
        component:WatchTV
    },
    {
        path:'/detail/:iid',
        component:Detail
    }
]

const bpRoute=new createRouter({
    routes:routes,
    history:createWebHistory()
})

export default bpRoute